<template>
  <div>
    <p class="bread">首页 》咨询 》馆务公开</p>
    <div class="content gwgk">
      <div class="left">
        <ul>
          <li @click="nav(1)">
            <router-link :to="xinwenzixun">
              <span :class="{blue:choose==1}">新闻咨询</span>
            </router-link>
          </li>
          <li @click="nav(2)">
            <router-link :to="huodonggonggao">
              <span :class="{blue:choose==2}">活动公告</span>
            </router-link>
          </li>
          <li @click="nav(3)">
            <router-link :to="guanwugongkai">
              <span :class="{blue:choose==3}">馆务公开</span>
            </router-link>
          </li>
        </ul>
      </div>
      <router-view></router-view>
    </div>
    <foot2></foot2>
  </div>
</template>
<script>
import foot2 from "../../components/foot2";
export default {
  data() {
    return {
      choose: 1,
      data1: [
        { title: "舟山博物馆2019年度报告", p: "2020/2/5" },
        { title: "舟山博物馆2019年度报告", p: "2020/2/5" },
        { title: "舟山博物馆2019年度报告", p: "2020/2/5" },
        { title: "舟山博物馆2019年度报告", p: "2020/2/5" },
        { title: "舟山博物馆2019年度报告", p: "2020/2/5" },
        { title: "舟山博物馆2019年度报告", p: "2020/2/5" }
      ],
      huodonggonggao: "",
      xinwenzixun: "",
      guanwugongkai: ""
    };
  },
  components: {
    foot2: foot2
  },
  methods: {
    nav(i) {
      this.choose = i;
    }
  },
  mounted() {
    this.huodonggonggao = "/gw_left/huodonggonggao";
    this.guanwugongkai = "/gw_left/guanwugongkai";
    this.xinwenzixun = "/gw_left/xinwenzixun";
  },
  beforeRouteUpdate(to, from, next) {
    this.huodonggonggao = "/gw_left/huodonggonggao";
    this.guanwugongkai = "/gw_left/guanwugongkai";
    this.xinwenzixun = "/gw_left/xinwenzixun";

    next();
  }
};
</script>
<style scoped>
.gwgk.content {
  display: flex;
  justify-content: space-between;
  color: #4e4b4b;
  max-width: 1200px;
  font-size: 24px;
  margin: auto;
  line-height: 40px;
  padding-top: 90px;
  box-sizing: border-box;
  padding-bottom: 200px;
}
.gwgk .title {
  font-size: 24px;
  border-bottom: 2px solid rgb(107, 128, 173);
  color: rgb(107, 128, 173);
}
.gwgk li {
  list-style: none;
}
.gwgk ul,
li,
p {
  padding: 0px;
  margin: 0px;
}
.gwgk .left {
  width: 20%;
  height: 280px;
  background: rgb(78, 105, 161);
}
.gwgk .left ul {
  padding: 30px;
  box-sizing: border-box;
}
.gwgk .left ul li {
  margin-bottom: 20px;
  color: white;

  padding: 5px 0px 10px;
  box-sizing: border-box;
}

.gwgk .left ul li span {
  display: inline-block;
  margin-left: 12px;
}
.gwgk .left ul li:not(:last-child) {
  border-bottom: 1px solid white;
}
.gwgk .right {
  background: rgb(230, 230, 230);
  width: 76%;
  padding: 0 30px 0;
  box-sizing: border-box;
}

.gwgk .blue {
  color: rgb(25, 67, 119);
}
.zs_k {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
.zs_title {
  font-weight: bold;
}
.zs_content {
  font-size: 16px;
}

.bread {
  max-width: 1150px;
  margin: auto;
  height: 60px;
}
</style>